@page "/Recharge"

@attribute [UserNavigation("充值")]
@rendermode InteractiveServer
@attribute [TabItemOption(Text = "充值", Icon = "fa-solid fas fa-bars")]
@attribute [Authorize]
 


<Table TItem="用户账户余额表"
        IsPagination="true"  
        IsStriped="true" IsBordered="true"
        ShowAddButton="true"
        ShowEditButton="false"
        ShowDeleteButton="false"
        ShowExtendDeleteButton="false"
        ShowExtendEditButton="false"
        ShowToolbar="true" IsMultipleSelect="true" ShowExtendButtons="true"
        AutoGenerateColumns="true"
        OnQueryAsync="@OnQueryAsync"
        AddButtonText="开户"
        IsAutoRefresh="true"
        OnSaveAsync="@OnSaveAsync"
         >
  <TableToolbarTemplate>
        <TableToolbarButton TItem="用户账户余额表" IsEnableWhenSelectedOneRow="true" Color="Color.Info" Icon="fa-solid fa-user" Text="充值" OnClickCallback="roles => OnRechargeUsersAsync(roles.First())" /> 
        
    </TableToolbarTemplate>
    <EditTemplate >
        <div class="row g-3 form-inline">
            <div class="col-12 col-sm-6">
                <BootstrapInput @bind-Value="@context.用户ID"    />
            </div>
              <div class="col-12 col-sm-6">
                  <BootstrapInputNumber      @bind-Value="@context.当前余额" placeholder="不可为空，最多一次充值10000000"    Max="10000000" Min="1" />
        
            </div>
           
        </div>
    </EditTemplate>
    <RowButtonTemplate>
        <TableCellButton Size="Size.ExtraSmall" Color="Color.Success" Icon="fa-solid fa-bars" Text="流水详情" OnClick="() => ShowAccountDetails(context)" />
    </RowButtonTemplate>

   
</Table>
 